//本地使用的地址
const baseUrl = "http://127.0.0.1:3001/";
//服务器端使用的地址
// const baseUrl = "http://47.104.16.62:3001/";

const URL = {
    /****************************************************与用户操作有关的api*****************************************/
    doLogin: baseUrl + "api/user/login",                    //实现登录功能
    doRegister: baseUrl + "api/user/register",              //实现注册功能
    hasPayPwd: baseUrl + "api/user/hasPayPwd",              //判断是否有支付密码
    setPayPwd: baseUrl + "api/user/setPayPwd",               //设置支付密码
    validPayPwd: baseUrl + "api/user/validPayPwd",           //检验支付密码
    updatePassword: baseUrl + "api/user/updatePassword",     //修改登录密码
    current: baseUrl + "api/user/current",
    updateNickname: baseUrl + "api/user/updateNickname",           //修改用户昵称
    changeAvatar: baseUrl + "api/user/changeAvatar",               //修改头像
    checkLoginPassword: baseUrl + "api/user/checkLoginPassword",   //检查用户密码是否正确
    feedback: baseUrl + "api/user/feedback",                       //用户反馈


    /*************************************主页获取书籍显示数据有关的api*****************************************/
    getBannerImage: baseUrl + "api/book/getBannerImage",         //获取轮播图数据
    getHotGoods: baseUrl + "api/book/getHotGood",           //获取热卖商品
    getSaleGood: baseUrl + "api/book/getSaleGood",          //获取折扣商品
    getDiscoverGood: baseUrl + "api/book/getDiscoverGood",  //获取发现图书
    getAllClassify: baseUrl + "api/book/getAllClassify",  //获取图书分类
    getGivenClassifyInfo: baseUrl + "api/book/getGivenClassifyInfo", //获取特定分类的数据
    getBookInfoById: baseUrl + "api/book/getBookInfoById",  //获取特定图书
    searchBook: baseUrl + "api/book/searchBook",             //模糊查询图书


    /************************************购物车显示数据有关的api*****************************************/

    getCartById: baseUrl + "api/cart/getCartById",             //获取购物车商品的信息
    getUserCartList: baseUrl + "api/cart/getUserCartList",   //获取购物车信息
    addCart: baseUrl + "api/cart/addCart",                   //购物信息添加
    updateCartCount: baseUrl + "api/cart/updateCartCount",   //修改购买的数量
    deleteCart: baseUrl + "api/cart/deleteCart",              //删除购物车数据的商品


    /************************************关于地址的操作有关的api*****************************************/
    getDefaultAddress: baseUrl + "api/address/getDefaultAddress", //获取默认地址（userId）
    getAddressList: baseUrl + "api/address/getAddressList",       //获取收货地址 {userId}
    addAddress: baseUrl + "api/address/addAddress",               //添加收货地址 {content}
    getAddressById: baseUrl + "api/address/getAddressById",       //获取收获地址 {id}
    deleteAddress: baseUrl + "api/address/deleteAddress",         //删除地址 {id}
    updateAddress: baseUrl + "api/address/updateAddress",         //修改地址 {id，content}


    /************************************关于订单的的操作有关的api*****************************************/
    createdOrder: baseUrl + "api/order/createdOrder",             //创建订单
    setOrderPayment: baseUrl + "api/order/setOrderPayment",       //完成付款
    getOrderList: baseUrl + "api/order/getOrderList",             //获取用户订单
    submitRefundOrder: baseUrl + "api/order/submitRefundOrder",   //提交退款订单
    submitOrderComplete: baseUrl + "api/order/submitOrderComplete",  //确认收货
    getAllOrderList: baseUrl + "api/order/getAllOrderList",
    deleteOrder: baseUrl + "api/order/deleteOrder",
    getOrderDetailById: baseUrl + "api/order/getOrderDetailById",
    getLogisticsInformation: baseUrl + "api/order/getLogisticsInformation",  //获取订单物流信息

    getStoreInfo: baseUrl + "api/store/getStoreInfo"
};

export default URL;